#!/bin/sh
# PCP QA Test No. 950
# Check that pmproxy advertises its presence using avahi
#
# Copyright (c) 2014 Red Hat.
#

seq=`basename $0`
echo "QA output created by $seq"

. ./common.avahi
avahi_notrun_checks

status=1	# failure is the default!
$sudo rm -rf $tmp.* $seq.full
trap "avahi_cleanup; exit \$status" 0 1 2 3 15

_filter()
{
    sed \
	-e "/Failed to resolve service '.*' of type '_pmproxy._tcp' in domain 'local': Timeout reached/d" \
    # done
}

# real QA test starts here
service=pmproxy
avahi_service
_wait_for_pmproxy
sleep 5
avahi_verify 2>&1 \
| _filter
status=0
exit
